package de.tum.Misc;

import android.content.Context;
import android.widget.Toast;

/**
 * Runnable Toast output
 * needed since we want to show toast in a app
 * @author Rupert
 *
 */
public class ToastFromThread implements Runnable{
	private String text;
	private Context appContext;
	
	/**
	 * Initialization with the text to be shown
	 * @param text
	 */
	public ToastFromThread(String text, Context appContext) {
		this.text = text;
		this.appContext = appContext;
	}
	
	/**
	 * Displaying the text in the run-Method
	 */
	@Override
	public void run() {
		Toast.makeText(appContext, text, Toast.LENGTH_SHORT).show();			
	}
	
	


}
